require 'pathname'

class GrinExec

  def GrinExec.run(file_in, file_out, file_type)
    install_dir = File.dirname(__FILE__)
    transform_jar = File.join(install_dir,"transform.jar")
    grin_jar = File.join(install_dir,"grin.jar")
    exec = %x[java -cp .;#{transform_jar}; -jar #{grin_jar} #{file_in} #{file_out} #{file_type}]
    File.exists? file_out
  end
  
end
